$splitbutton-menu-button-width: 1.875rem !default;
$splitbutton-menu-button-padding: 0 0 0.375rem 0 !default;
$splitbutton-menu-button-font-size: 1.0625rem !default;
$splitbutton-menu-button-border: solid 1px #e5613a !default;
$splitbutton-menu-shadow: 0 6px 14px 0 rgba(0, 0, 0, 0.06) !default;
$splitbutton-menu-min-width: 10rem !default;

$splitbutton-padding: 0 $dropdown-horizontal-padding !default;
$splitbutton-background-color: $primary-color !default;
$splitbutton-border-radius: $input-border-radius !default;

.rz-splitbutton {
  display: inline-flex;

  .rz-button-text-icon-left,
  .rz-button-text-only {
    @extend .rz-button-md;

    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: $splitbutton-padding;
  }

  .rz-button {
    background-color: $splitbutton-background-color;
  }
}

.rz-splitbutton-menu {
  @extend %dropdown-panel;
  display: none;
  position: absolute;
  min-width: $splitbutton-menu-min-width;

  border-top-right-radius: $splitbutton-border-radius;
  box-shadow: $splitbutton-menu-shadow;
}

.rz-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rz-menuitem {
  @extend .rz-dropdown-item;

  &:hover {
    &:first-child {
      border-top-right-radius: $splitbutton-border-radius;
    }
  }

  .rz-menuitem-link {
    color: inherit;
    display: block;

    &:hover {
      text-decoration: none;
    }
  }

  .rz-menuitem-icon {
    @extend .rzi;
    vertical-align: top;
  }
}

.rz-splitbutton-menubutton {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: $splitbutton-menu-button-border;

  @extend .rz-button-md;

  .rz-button-text {
    display: none;
  }

  .rzi-chevron-down {
    &:before {
      content: 'arrow_drop_down';
    }
  }
}
